package com.just.recruitback.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author baibaiwuchang
 * @since 2020-07-02
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class Company implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 公司名称
     */
    private String name;

    /**
     * 公司大小
     */
    private String size;

    /**
     * 公司类别
     */
    private String type;

    /**
     * 公司分数
     */
    private String score;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    public static Company zhilianConvertToCompany(Zhilian zhilian) {
        return new Company().setName(zhilian.getCompanyName())
                .setSize(zhilian.getCompanySize())
                .setType(zhilian.getCompanyType())
                .setScore(zhilian.getCompanyScore())
                .setCreateTime(LocalDateTime.now());
    }

}
